//
//  UILable+Extension.swift
//  SinaWeiBo
//
//  Created by tuyue on 16/3/12.
//  Copyright © 2016年 xueyang.co.ltd. All rights reserved.
//

import UIKit 

extension UILabel{
/**UILabel的封装*/
    class func labelWith(text:String,fontSize:CGFloat,textColor:UIColor,textAlignment:NSTextAlignment = .Center) -> UILabel{
        let lb = UILabel()
        lb.font = UIFont.systemFontOfSize(fontSize)
        lb.textColor = UIColor.lightGrayColor()
        lb.text = text
        /**设置居中显示*/
        lb.textAlignment = textAlignment
        /**设置label呈现几行显示，0行为自动换行，默认1*/
        lb.numberOfLines = 0
        lb.sizeToFit()
        return lb
    
    }

}